package com.example.previewvideo.util;

import android.hardware.Camera;

public class CameraUtils {

    public static boolean isCameraInUse() {
        Camera camera = null;
        try {
            camera = Camera.open();
        } catch (Exception e) {
            // 相机被其他应用程序使用，或者无法访问相机
            return true;
        } finally {
            if (camera != null) {
                camera.release();
            }
        }
        return false;
    }
}
